home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / ENTRPRIS / APE / AEEXPDTR / FRMEXPDT.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-12-06  |  8.4 KB  |  245 lines

  1. VERSION 5.00
  2. Begin VB.Form frmExpediter 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Expediter"
  5.    ClientHeight    =   2100
  6.    ClientLeft      =   10575
  7.    ClientTop       =   4875
  8.    ClientWidth     =   4200
  9.    ClipControls    =   0   'False
  10.    Icon            =   "frmexpdt.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   2100
  14.    ScaleWidth      =   4200
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.ListBox lstLog 
  17.       Height          =   525
  18.       IntegralHeight  =   0   'False
  19.       Left            =   2880
  20.       TabIndex        =   0
  21.       Top             =   1350
  22.       Visible         =   0   'False
  23.       Width           =   525
  24.    End
  25.    Begin VB.Timer tmrExpediter 
  26.       Left            =   3420
  27.       Top             =   1620
  28.    End
  29.    Begin VB.Label lblCaption 
  30.       BackStyle       =   0  'Transparent
  31.       Caption         =   "Current Backlog"
  32.       BeginProperty Font 
  33.          Name            =   "MS Sans Serif"
  34.          Size            =   12
  35.          Charset         =   0
  36.          Weight          =   400
  37.          Underline       =   0   'False
  38.          Italic          =   0   'False
  39.          Strikethrough   =   0   'False
  40.       EndProperty
  41.       Height          =   300
  42.       Index           =   0
  43.       Left            =   240
  44.       TabIndex        =   7
  45.       Top             =   180
  46.       Width           =   2535
  47.    End
  48.    Begin VB.Label lblCaption 
  49.       BackStyle       =   0  'Transparent
  50.       Caption         =   "Peak Backlog"
  51.       BeginProperty Font 
  52.          Name            =   "MS Sans Serif"
  53.          Size            =   12
  54.          Charset         =   0
  55.          Weight          =   400
  56.          Underline       =   0   'False
  57.          Italic          =   0   'False
  58.          Strikethrough   =   0   'False
  59.       EndProperty
  60.       Height          =   300
  61.       Index           =   1
  62.       Left            =   240
  63.       TabIndex        =   6
  64.       Top             =   540
  65.       Width           =   2535
  66.    End
  67.    Begin VB.Label lblCaption 
  68.       BackStyle       =   0  'Transparent
  69.       Caption         =   "Total Callbacks"
  70.       BeginProperty Font 
  71.          Name            =   "MS Sans Serif"
  72.          Size            =   12
  73.          Charset         =   0
  74.          Weight          =   400
  75.          Underline       =   0   'False
  76.          Italic          =   0   'False
  77.          Strikethrough   =   0   'False
  78.       EndProperty
  79.       Height          =   300
  80.       Index           =   2
  81.       Left            =   240
  82.       TabIndex        =   5
  83.       Top             =   900
  84.       Width           =   2535
  85.    End
  86.    Begin VB.Label lblBacklog 
  87.       BackStyle       =   0  'Transparent
  88.       BeginProperty Font 
  89.          Name            =   "MS Sans Serif"
  90.          Size            =   12
  91.          Charset         =   0
  92.          Weight          =   400
  93.          Underline       =   0   'False
  94.          Italic          =   0   'False
  95.          Strikethrough   =   0   'False
  96.       EndProperty
  97.       Height          =   300
  98.       Left            =   2880
  99.       TabIndex        =   4
  100.       Top             =   180
  101.       Width           =   1095
  102.    End
  103.    Begin VB.Label lblPeak 
  104.       BackStyle       =   0  'Transparent
  105.       BeginProperty Font 
  106.          Name            =   "MS Sans Serif"
  107.          Size            =   12
  108.          Charset         =   0
  109.          Weight          =   400
  110.          Underline       =   0   'False
  111.          Italic          =   0   'False
  112.          Strikethrough   =   0   'False
  113.       EndProperty
  114.       Height          =   300
  115.       Left            =   2880
  116.       TabIndex        =   3
  117.       Top             =   540
  118.       Width           =   1095
  119.    End
  120.    Begin VB.Label lblCount 
  121.       BackStyle       =   0  'Transparent
  122.       BeginProperty Font 
  123.          Name            =   "MS Sans Serif"
  124.          Size            =   12
  125.          Charset         =   0
  126.          Weight          =   400
  127.          Underline       =   0   'False
  128.          Italic          =   0   'False
  129.          Strikethrough   =   0   'False
  130.       EndProperty
  131.       Height          =   300
  132.       Left            =   2880
  133.       TabIndex        =   2
  134.       Top             =   900
  135.       Width           =   1095
  136.    End
  137.    Begin VB.Label lblStatus 
  138.       BackStyle       =   0  'Transparent
  139.       BeginProperty Font 
  140.          Name            =   "MS Sans Serif"
  141.          Size            =   9.75
  142.          Charset         =   0
  143.          Weight          =   400
  144.          Underline       =   0   'False
  145.          Italic          =   0   'False
  146.          Strikethrough   =   0   'False
  147.       EndProperty
  148.       Height          =   255
  149.       Left            =   240
  150.       TabIndex        =   1
  151.       Top             =   1710
  152.       Width           =   3825
  153.    End
  154. Attribute VB_Name = "frmExpediter"
  155. Attribute VB_GlobalNameSpace = False
  156. Attribute VB_Creatable = False
  157. Attribute VB_PredeclaredId = True
  158. Attribute VB_Exposed = False
  159. Option Explicit
  160. Private Sub Form_Load()
  161.     '-------------------------------------------------------------------------
  162.     'Effects:
  163.     '       Position form and load captions from string resource
  164.     '-------------------------------------------------------------------------
  165.     'Use clsPositionForm object to move
  166.     'Form to settings saved in registry
  167.     Dim oPosition As clsPositionForm
  168.     Set oPosition = New clsPositionForm
  169.     'Set the U/I values
  170.     ApplyFontToForm Me, giFONT_NAME_INDEX, giFONT_SIZE_INDEX, giFONT_CHARSET_INDEX
  171.     Caption = LoadResString(giFORM_CAPTION)
  172.     lblCaption(0).Caption = LoadResString(giCURRENT_BACKLOG_CAPTION)
  173.     lblCaption(1).Caption = LoadResString(giPEAK_BACKLOG_CAPTION)
  174.     lblCaption(2).Caption = LoadResString(giTOTAL_CALLBACK_CAPTION)
  175.     'Condition compile toggles between a debug
  176.     'mode that displays a list box with displaying
  177.     'all loggable events.
  178.     #If ccShowList Then
  179.         oPosition.Move Me, True
  180.         lstLog.Visible = True
  181.         lblStatus.Visible = False
  182.         lblBacklog.Visible = False
  183.         lblPeak.Visible = False
  184.         lblCount.Visible = False
  185.     #Else
  186.         oPosition.Move Me, False
  187.         Width = giDEFAULT_FORM_WIDTH
  188.         Height = giDEFAULT_FORM_HEIGHT
  189.     #End If
  190. End Sub
  191. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  192.     'If user unloads form cancel unload
  193.     Dim oPosition As clsPositionForm
  194.     'Use clsPositionForm object to save
  195.     'forms position in registry
  196.     Set oPosition = New clsPositionForm
  197.     If Me.Visible Then oPosition.Save Me
  198.     If UnloadMode = vbFormControlMenu And glInstances <> 0 Then
  199.         Cancel = True
  200.     End If
  201. End Sub
  202. Private Sub Form_Resize()
  203.     #If ccShowList Then
  204.         Dim lX As Long
  205.         Dim lY As Long
  206.         If Me.ScaleHeight >= 2 * glFORM_MARGIN Then lY = (Me.ScaleHeight - (2 * glFORM_MARGIN)) Else lY = (2 * glFORM_MARGIN) - Me.ScaleHeight
  207.         If Me.ScaleWidth >= 2 * glFORM_MARGIN Then lX = (Me.ScaleWidth - (2 * glFORM_MARGIN)) Else lX = (2 * glFORM_MARGIN) - Me.ScaleWidth
  208.         lstLog.Move glFORM_MARGIN, glFORM_MARGIN, lX, lY
  209.     #End If
  210. End Sub
  211. Private Sub tmrExpediter_Timer()
  212.     '-------------------------------------------------------------------------
  213.     'Effects:
  214.     '       Polls the QueueMgr for Service Results.  If any are received the
  215.     '       Expediter will attempt to call all the callbacks and deliver the
  216.     '       the results
  217.     '
  218.     '       If gbStopTest became true during this process DestroyReferences
  219.     '       will be called at end of procedure
  220.     '   [gbBusy]
  221.     '       Is true during procedure
  222.     '-------------------------------------------------------------------------
  223.     On Error GoTo tmrExpediter_Timer
  224.     'Exit if already entered this procedure
  225.     If gbBusy Or gbStopTest Then Exit Sub
  226.     gbBusy = True
  227.     If PollQueue Then
  228.         tmrExpediter.Interval = 0
  229.         DeliverResults
  230.     End If
  231.     If gbStopTest Then
  232.         'References to Expediter may have
  233.         'been destroyed while PollQueue or DeliverResults
  234.         'was busy.  If gbBusy was true when Expediter's references
  235.         'were destoyed, DestroyReferences needs called again to
  236.         'make sure logger and form is destroyed
  237.         DestroyReferences
  238.     End If
  239.     gbBusy = False
  240.     Exit Sub
  241. tmrExpediter_Timer:
  242.     LogError Err, 0
  243.     Exit Sub
  244. End Sub
  245.